<?php


class HuiyingModel extends BaseModel
{

    var $table  = 'huiying';	

    var $_page_rows = 20;	
	
    /* 插入数据 */
    function post($data)
    {    
	
		$time = time();     
        $data['add_time']=$time;
		return $this->IU_Sql_Exe(array ('data' => $data, 'mode' => 'INSERT'));

        
    }



    /* 插入数据 */
    function del($user_id = '',$id ='')
    {      
		return $this->D_Sql_Exe(array ('conditions' =>"user_id = '{$user_id}' and id = '{$id}' "));
        
    }

    /* 修改数据 */
    function editaction($user_id = '',$id ='',$data = '')
    {    
	    $time = time();
		return $this->IU_Sql_Exe(array ('data' => $data,'mode' => 'UPDATE','conditions' =>"user_id = '{$user_id}' and id = '{$id}' "));
        
    }

}








?>